Integrand size = 15, antiderivative size = 87 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\frac {b^3 \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}+\frac {\left (a^2+3 a b+3 b^2\right ) \tan (x)}{(a+b)^3}+\frac {(2 a+3 b) \tan ^3(x)}{3 (a+b)^2}+\frac {\tan ^5(x)}{5 (a+b)} \]
b^3*arctan((a+b)^(1/2)*tan(x)/a^(1/2))/(a+b)^(7/2)/a^(1/2)+(a^2+3*a*b+3*b^ 2)*tan(x)/(a+b)^3+1/3*(2*a+3*b)*tan(x)^3/(a+b)^2+1/5*tan(x)^5/(a+b)
Time = 0.43 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.03 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\frac {b^3 \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}+\frac {\left (8 a^2+26 a b+33 b^2+\left (4 a^2+13 a b+9 b^2\right ) \sec ^2(x)+3 (a+b)^2 \sec ^4(x)\right ) \tan (x)}{15 (a+b)^3} \]
(b^3*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(7/2)) + ((8*a ^2 + 26*a*b + 33*b^2 + (4*a^2 + 13*a*b + 9*b^2)*Sec[x]^2 + 3*(a + b)^2*Sec [x]^4)*Tan[x])/(15*(a + b)^3)
Time = 0.31 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3042, 3670, 300, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cos (x)^6 \left (a+b \sin (x)^2\right )}dx\) |
\(\Big \downarrow \) 3670 |
\(\displaystyle \int \frac {\left (\tan ^2(x)+1\right )^3}{(a+b) \tan ^2(x)+a}d\tan (x)\) |
\(\Big \downarrow \) 300 |
\(\displaystyle \int \left (\frac {a^2+3 a b+3 b^2}{(a+b)^3}+\frac {b^3}{(a+b)^3 \left ((a+b) \tan ^2(x)+a\right )}+\frac {\tan ^4(x)}{a+b}+\frac {(2 a+3 b) \tan ^2(x)}{(a+b)^2}\right )d\tan (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\left (a^2+3 a b+3 b^2\right ) \tan (x)}{(a+b)^3}+\frac {b^3 \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}+\frac {\tan ^5(x)}{5 (a+b)}+\frac {(2 a+3 b) \tan ^3(x)}{3 (a+b)^2}\) |
(b^3*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(7/2)) + ((a^2 + 3*a*b + 3*b^2)*Tan[x])/(a + b)^3 + ((2*a + 3*b)*Tan[x]^3)/(3*(a + b)^2) + Tan[x]^5/(5*(a + b))
3.4.13.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Su bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
Time = 1.36 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.25
method | result | size |
default | \(\frac {\frac {a^{2} \left (\tan ^{5}\left (x \right )\right )}{5}+\frac {2 a b \left (\tan ^{5}\left (x \right )\right )}{5}+\frac {b^{2} \left (\tan ^{5}\left (x \right )\right )}{5}+\frac {2 a^{2} \left (\tan ^{3}\left (x \right )\right )}{3}+\frac {5 a b \left (\tan ^{3}\left (x \right )\right )}{3}+b^{2} \left (\tan ^{3}\left (x \right )\right )+a^{2} \tan \left (x \right )+3 a b \tan \left (x \right )+3 b^{2} \tan \left (x \right )}{\left (a +b \right )^{3}}+\frac {b^{3} \arctan \left (\frac {\left (a +b \right ) \tan \left (x \right )}{\sqrt {a \left (a +b \right )}}\right )}{\left (a +b \right )^{3} \sqrt {a \left (a +b \right )}}\) | \(109\) |
risch | \(\frac {2 i \left (15 b^{2} {\mathrm e}^{8 i x}+30 a b \,{\mathrm e}^{6 i x}+90 b^{2} {\mathrm e}^{6 i x}+80 a^{2} {\mathrm e}^{4 i x}+230 a b \,{\mathrm e}^{4 i x}+240 b^{2} {\mathrm e}^{4 i x}+40 \,{\mathrm e}^{2 i x} a^{2}+130 a b \,{\mathrm e}^{2 i x}+150 \,{\mathrm e}^{2 i x} b^{2}+8 a^{2}+26 a b +33 b^{2}\right )}{15 \left (a +b \right )^{3} \left ({\mathrm e}^{2 i x}+1\right )^{5}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i x}-\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{3}}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i x}-\frac {-2 i a^{2}-2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{3}}\) | \(295\) |
1/(a+b)^3*(1/5*a^2*tan(x)^5+2/5*a*b*tan(x)^5+1/5*b^2*tan(x)^5+2/3*a^2*tan( x)^3+5/3*a*b*tan(x)^3+b^2*tan(x)^3+a^2*tan(x)+3*a*b*tan(x)+3*b^2*tan(x))+b ^3/(a+b)^3/(a*(a+b))^(1/2)*arctan((a+b)*tan(x)/(a*(a+b))^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (75) = 150\).
Time = 0.33 (sec) , antiderivative size = 459, normalized size of antiderivative = 5.28 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\left [-\frac {15 \, \sqrt {-a^{2} - a b} b^{3} \cos \left (x\right )^{5} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (x\right )^{2} + 4 \, {\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{3} - {\left (a + b\right )} \cos \left (x\right )\right )} \sqrt {-a^{2} - a b} \sin \left (x\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (x\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (x\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) - 4 \, {\left ({\left (8 \, a^{4} + 34 \, a^{3} b + 59 \, a^{2} b^{2} + 33 \, a b^{3}\right )} \cos \left (x\right )^{4} + 3 \, a^{4} + 9 \, a^{3} b + 9 \, a^{2} b^{2} + 3 \, a b^{3} + {\left (4 \, a^{4} + 17 \, a^{3} b + 22 \, a^{2} b^{2} + 9 \, a b^{3}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{60 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{5}}, -\frac {15 \, \sqrt {a^{2} + a b} b^{3} \arctan \left (\frac {{\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a - b}{2 \, \sqrt {a^{2} + a b} \cos \left (x\right ) \sin \left (x\right )}\right ) \cos \left (x\right )^{5} - 2 \, {\left ({\left (8 \, a^{4} + 34 \, a^{3} b + 59 \, a^{2} b^{2} + 33 \, a b^{3}\right )} \cos \left (x\right )^{4} + 3 \, a^{4} + 9 \, a^{3} b + 9 \, a^{2} b^{2} + 3 \, a b^{3} + {\left (4 \, a^{4} + 17 \, a^{3} b + 22 \, a^{2} b^{2} + 9 \, a b^{3}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{30 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{5}}\right ] \]
[-1/60*(15*sqrt(-a^2 - a*b)*b^3*cos(x)^5*log(((8*a^2 + 8*a*b + b^2)*cos(x) ^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(x)^2 + 4*((2*a + b)*cos(x)^3 - (a + b)*co s(x))*sqrt(-a^2 - a*b)*sin(x) + a^2 + 2*a*b + b^2)/(b^2*cos(x)^4 - 2*(a*b + b^2)*cos(x)^2 + a^2 + 2*a*b + b^2)) - 4*((8*a^4 + 34*a^3*b + 59*a^2*b^2 + 33*a*b^3)*cos(x)^4 + 3*a^4 + 9*a^3*b + 9*a^2*b^2 + 3*a*b^3 + (4*a^4 + 17 *a^3*b + 22*a^2*b^2 + 9*a*b^3)*cos(x)^2)*sin(x))/((a^5 + 4*a^4*b + 6*a^3*b ^2 + 4*a^2*b^3 + a*b^4)*cos(x)^5), -1/30*(15*sqrt(a^2 + a*b)*b^3*arctan(1/ 2*((2*a + b)*cos(x)^2 - a - b)/(sqrt(a^2 + a*b)*cos(x)*sin(x)))*cos(x)^5 - 2*((8*a^4 + 34*a^3*b + 59*a^2*b^2 + 33*a*b^3)*cos(x)^4 + 3*a^4 + 9*a^3*b + 9*a^2*b^2 + 3*a*b^3 + (4*a^4 + 17*a^3*b + 22*a^2*b^2 + 9*a*b^3)*cos(x)^2 )*sin(x))/((a^5 + 4*a^4*b + 6*a^3*b^2 + 4*a^2*b^3 + a*b^4)*cos(x)^5)]
\[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\int \frac {\sec ^{6}{\left (x \right )}}{a + b \sin ^{2}{\left (x \right )}}\, dx \]
Time = 0.35 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.45 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\frac {b^{3} \arctan \left (\frac {{\left (a + b\right )} \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {{\left (a + b\right )} a}} + \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (x\right )^{5} + 5 \, {\left (2 \, a^{2} + 5 \, a b + 3 \, b^{2}\right )} \tan \left (x\right )^{3} + 15 \, {\left (a^{2} + 3 \, a b + 3 \, b^{2}\right )} \tan \left (x\right )}{15 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )}} \]
b^3*arctan((a + b)*tan(x)/sqrt((a + b)*a))/((a^3 + 3*a^2*b + 3*a*b^2 + b^3 )*sqrt((a + b)*a)) + 1/15*(3*(a^2 + 2*a*b + b^2)*tan(x)^5 + 5*(2*a^2 + 5*a *b + 3*b^2)*tan(x)^3 + 15*(a^2 + 3*a*b + 3*b^2)*tan(x))/(a^3 + 3*a^2*b + 3 *a*b^2 + b^3)
Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (75) = 150\).
Time = 0.30 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.92 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (x\right ) + b \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} b^{3}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {a^{2} + a b}} + \frac {3 \, a^{4} \tan \left (x\right )^{5} + 12 \, a^{3} b \tan \left (x\right )^{5} + 18 \, a^{2} b^{2} \tan \left (x\right )^{5} + 12 \, a b^{3} \tan \left (x\right )^{5} + 3 \, b^{4} \tan \left (x\right )^{5} + 10 \, a^{4} \tan \left (x\right )^{3} + 45 \, a^{3} b \tan \left (x\right )^{3} + 75 \, a^{2} b^{2} \tan \left (x\right )^{3} + 55 \, a b^{3} \tan \left (x\right )^{3} + 15 \, b^{4} \tan \left (x\right )^{3} + 15 \, a^{4} \tan \left (x\right ) + 75 \, a^{3} b \tan \left (x\right ) + 150 \, a^{2} b^{2} \tan \left (x\right ) + 135 \, a b^{3} \tan \left (x\right ) + 45 \, b^{4} \tan \left (x\right )}{15 \, {\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )}} \]
(pi*floor(x/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(x) + b*tan(x))/sqrt(a ^2 + a*b)))*b^3/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*sqrt(a^2 + a*b)) + 1/15*( 3*a^4*tan(x)^5 + 12*a^3*b*tan(x)^5 + 18*a^2*b^2*tan(x)^5 + 12*a*b^3*tan(x) ^5 + 3*b^4*tan(x)^5 + 10*a^4*tan(x)^3 + 45*a^3*b*tan(x)^3 + 75*a^2*b^2*tan (x)^3 + 55*a*b^3*tan(x)^3 + 15*b^4*tan(x)^3 + 15*a^4*tan(x) + 75*a^3*b*tan (x) + 150*a^2*b^2*tan(x) + 135*a*b^3*tan(x) + 45*b^4*tan(x))/(a^5 + 5*a^4* b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)
Time = 14.13 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.39 \[ \int \frac {\sec ^6(x)}{a+b \sin ^2(x)} \, dx=\frac {{\mathrm {tan}\left (x\right )}^5}{5\,\left (a+b\right )}-{\mathrm {tan}\left (x\right )}^3\,\left (\frac {a}{3\,{\left (a+b\right )}^2}-\frac {1}{a+b}\right )+\mathrm {tan}\left (x\right )\,\left (\frac {3}{a+b}+\frac {a\,\left (\frac {a}{{\left (a+b\right )}^2}-\frac {3}{a+b}\right )}{a+b}\right )+\frac {b^3\,\mathrm {atan}\left (\frac {\mathrm {tan}\left (x\right )\,\left (2\,a+2\,b\right )\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}{2\,\sqrt {a}\,{\left (a+b\right )}^{7/2}}\right )}{\sqrt {a}\,{\left (a+b\right )}^{7/2}} \]